1. Field of the Invention
The present invention relates to a motion vector detecting apparatus and a motion vector detecting method that detect a motion vector from moving image data and that are preferably applicable to image processing, such as high-efficiency encoding, and to a program executing the motion vector detecting method.
2. Description of the Related Art
Hitherto, moving image processing is efficiently performed by using motion information, specifically, by using the directions and magnitudes of motions of objects in temporally different images. For example, results of motion detection are used in encoding between motion compensation frames in high-efficiency encoding of images and in parameter control using motions in television noise reduction apparatuses by using time domain filters between frames. Block matching is in widespread use as a method of detecting motions. In the block matching, an area in which each block moves is detected. The block is a unit including a predetermined number of pixels in one frame image. The detection of motion vectors by the block matching is put into practical use in, for example, Moving Picture Experts Group (MPEG) methods and is most popular as the image processing using motion vectors.
However, since the block matching is performed in units of blocks, the motion of the image in each frame is not necessarily detected accurately. Accordingly, the assignee has proposed a motion-vector detecting process disclosed in Japanese Unexamined Patent Application Publication No. 2005-175869. In the motion vector detecting process disclosed in Japanese Unexamined Patent Application Publication No. 2005-175869, an evaluation value concerning the motion of each pixel position is detected from an image signal, the detected evaluation value is held in an evaluation value table, and multiple vectors are extracted from the data in the evaluation value table as candidate vectors in one screen. Then, the correlation of each pixel between the frames connected to each other by the multiple extracted candidate vectors is determined. The candidate vector connecting a pixel determined to have the highest correlation is determined as a motion vector for the pixel. This processing will be described in detail below in the description of embodiments of the present invention.
FIG. 22 is a block diagram showing an example of the configuration of an evaluation-value-table generating unit used in the motion-vector detecting process when an evaluation value table is used to determine a motion vector. Referring to FIG. 22, an image signal input through an input terminal 1 is supplied to a correlation calculating part 2. The correlation calculating part 2 includes a reference point memory 2a, a target point memory 2b, and an absolute value calculator 2c. The image signal input through the input terminal 1 is first stored in the reference point memory 2a and the data stored in the reference point memory 2a is moved to the target point memory 2b. The image signal stored in the reference point memory 2a is one frame after the image signal stored in the target point memory 2b. Then, the pixel value of a target point is read out from the image signal stored in the target point memory 2b, and the pixel value of the pixel position selected as a reference point is read out from the image signal stored in the reference point memory 2a. The absolute value of the difference between the pixel value of the target point and the pixel value of the reference point is calculated by the absolute value calculator 2c. Data about the calculated absolute value of the difference is supplied to a correlation determining part 3. A comparator 3a in the correlation determining part 3 compares the data about the calculated absolute value of the difference with a predetermined threshold value to obtain an evaluation value. The evaluation value is exemplified by a correlation value. For example, if the difference is not higher the threshold value, it is determined that higher correlation is found.
The evaluation value obtained by the correlation determining part 3 is supplied to an evaluation-value-table calculating part 4. In the evaluation-value-table calculating part 4, an evaluation value integrator 4a integrates the evaluation values and the result of the integration is stored in an evaluation-value-table memory 4b. The data stored in the evaluation-value-table memory 4b is supplied to a downstream circuit through an output terminal 5 as evaluation value table data.
FIGS. 23A and 23B illustrate a processing state in which the evaluation value table in related art described above with reference to FIG. 22 is used to determine a motion vector. As shown in FIG. 23A, a pixel position in a previous frame F0, on which the determination of the motion vector is based, is set as a target point d0. The previous frame F0 is image data one frame before the current frame F1. A predetermined range around the pixel position of the target point d0 is set as a search area SA in the current frame F1. Each pixel in the search area SA is set as a reference point d1, an evaluation value of the reference point d1 is calculated, and the calculated evaluation value is stored in an evaluation value table. The reference point having the highest evaluation value in the search area SA, among the evaluation values registered in the evaluation value table, is determined as the pixel position on the current frame F1 which is the destination of a motion from the target point d0 on the previous frame F0. A motion vector is determined from the amount of motion between the reference point having the highest evaluation value and the target point, as shown in FIG. 23B.
It is possible to detect the motion vector on the basis of the evaluation value table data by the processing shown in FIG. 22 and FIGS. 23A and 23B.